/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author FIRE
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface PmContractor extends BasicModel<PmContractor> {
  contractorno?: string; // 承包商编号
  name?: string; // 名称
  contractorabbname?: string; // 简称
  contractortype?: string; // 承包商类型
  createtime?: string; // 创建时间
  contacts?: string; // 联系人
  phone?: string; // 电话
  email?: string; // 邮箱
  fax?: string; // 传真
  webaddress?: string; // 网址
  address?: string; // 地址
  contractorsyn?: string; // 承包商简介
  state?: string; // 状态
}

export const pmContractorList = (params?: PmContractor | any) =>
  defHttp.get<PmContractor>({ url: adminPath + '/orther/ven/pmContractor/list', params });

export const pmContractorListData = (params?: PmContractor | any) =>
  defHttp.post<Page<PmContractor>>({ url: adminPath + '/orther/ven/pmContractor/listData', params });

export const pmContractorForm = (params?: PmContractor | any) =>
  defHttp.get<PmContractor>({ url: adminPath + '/orther/ven/pmContractor/form', params });

export const pmContractorSave = (params?: any, data?: PmContractor | any) =>
  defHttp.postJson<PmContractor>({ url: adminPath + '/orther/ven/pmContractor/save', params, data });

export const pmContractorDelete = (params?: PmContractor | any) =>
  defHttp.get<PmContractor>({ url: adminPath + '/orther/ven/pmContractor/delete', params });
